-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] Serverless Onboarding with Custom Tutorials #158228
[APM] Serverless Onboarding with Custom Tutorials #158228
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/oblt-deploy |
x-pack/plugins/apm/public/components/app/tutorials/agent_config_instructions.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/commands/node.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/commands/node.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/commands/node.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/agent_config_instructions.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/agent_config_table.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/app/tutorials/agent_config_table.tsx
Outdated
Show resolved
Hide resolved
…-ref HEAD~1..HEAD --fix'
@sqren Unfortunately not at this moment API Tests - We haven't introduced any new APIs as part of it. Re-using existing one which are already covered. |
Ah, bummer. Is there nothing we can do to access the new onboarding from the existing e2e setup? What if you set the needed serverless feature flag configs in the cypress config? |
Excellent, thank you!
If you look at the failing test output, you'll see the following:
You'll need to revert the changes made to |
Do we need data in order to test the on boarding? |
That's actually an interesting point. The route is registered irrespective of serverless/non serverless mode. Its only custom integration which will not get registered. In that case, with our regular cypress suite we should be able to test it. Thank you for the hint. I will play with it 👍🏼 @sqren I am also working on creating a follow up PR where i will add the Agent Status check which we discussed here. This PR is getting huge and i am any how creating a follow up PR immediately, is it fine to add cy test there ? |
Nope, what i meant was to identify if we are in Serverless Mode for custom integration. But looks like we don't need this check |
x-pack/plugins/apm/public/components/routing/templates/apm_main_template.tsx
Show resolved
Hide resolved
x-pack/plugins/apm/public/components/routing/templates/no_data_config.ts
Outdated
Show resolved
Hide resolved
@@ -181,6 +182,7 @@ export function registerRoutes({ | |||
|
|||
if (Boom.isBoom(error)) { | |||
opts.statusCode = error.output.statusCode; | |||
opts.body.attributes.data = error?.data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be careful about exposing error details (like the stack trace) to the client. I'm not sure if that's the case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a custom property where only intended data can be exposed. It will not expose stack trace. For example -
throw Boom.internal(error, { missingPrivileges }, 403);
In this case, the missingPrivileges
is what will be available here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Just a few nits.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Closes #155371
Summary
PR adds Serverless Onboarding flow using Custom Integration. This would also lay the foundation for us to complete get rid of Home Tutorial App and move the remaining
onPrem
andcloud
tutorials which are currently still loaded using Home Tutorial App.Adds new Custom Integration for Serverless Onboarding (Toggling Home AApp Tutorial Integration)
Since we are migrating away from the Home App Tutorials, lot of existing code has been duplicated and refactored for the custom implementation. Home App Tutorial would require the Server to register all the steps and the client to only register a custom component which then would be loaded by Home App Tutorial component. We don't need to follow this approach any more. All the UX logic has now been moved to the Public folder with only Custom Integration done on the
server/plugin.ts
.As we are not sure how the solutions will be informed about being running on Serverless or not, I have introduced a new variable in
serverless.oblt.yml
file calledxpack.apm.serverlessOnboarding: true
. With this the development has been done. This can be changed to actual logic once we know more.A new configuration
xpack.apm.managedServiceUrl
for accessing Managed Service URL is also being added by Control Plane team as part of https://elasticco.atlassian.net/browse/CP-2403. Hence this PR expects this property to be present for Serverless.Unit tests to toggle between
secret_token
andapi_key
depending on availability has been added. No API Tests were added as no new API created. Cypress Tests cannot be added due to ServerlessNeed help reviewing the PR ?
config/serverless.oblt.yml
- Adds the new flag which would enable this flowx-pack/plugins/apm/common/tutorial/tutorials.ts
- Defines the configuration required to register the APM's Tutorial Custom Integrationx-pack/plugins/apm/public/components/app/tutorials/commands
- This directory contains all the agent specific data required to load the TABLE with settings required for configuring APM MIS.x-pack/plugins/apm/public/components/app/tutorials/instructions
- This folder contains all the individual agent specific instructions in the format used by EuiStepsx-pack/plugins/apm/public/components/routing
- Here we register our custom routex-pack/plugins/apm/public/components/app/tutorials/serverless_instructions.tsx
- This file currently defines all the logic for registering Serverless instructions. We will soon have similar files foronPrem
andcloud
instructionsRisk Matrix
kibana.yml
file.Demo
Screen.Recording.2023-05-30.at.15.48.05.mov
Updated Demo with Create API Button inside the table
Screen.Recording.2023-05-31.at.12.26.26.mov